package cn.kimming.wms.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import cn.kimming.wms.dao.IEmployeeDAO;
import cn.kimming.wms.domain.Employee;

@Repository("employeeDAO")
public class EmployeeDAOImpl extends GenericDAOImpl<Employee> implements IEmployeeDAO{

	@Override
	public Employee login(String username, String password) {
		return queryForObject("obj.name=? and obj.password=?", username, password);
	}

	@Override
	public List<Employee> listByDeptId(Long deptId) {
		return queryForList("obj.dept.id = ?", deptId);
	}
	
}
